import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/pages/login/App.vue'), // 注意这里要带上 文件后缀.vue
    },
    {
        path: "/",
        name: "layout",
        component: () => import("@/layout/index.vue"),
        redirect:'/Home',
        children: [
            {
                path: "/Home",
                name: "Home",
                component: () => import("@/pages/Home/App.vue"),
            },
            {
                path: "/GuideVisitors",
                name: "china",
                component: () => import("@/pages/Guidevisitors/App.vue"),
            },
            {
                path: "/My",
                name: "My",
                component: () => import("@/pages/My/App.vue"),
            },
        ],
    },
]

const router = createRouter({
    history: createWebHistory(),
    routes,
})

export default router
